<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="FBGraph.Web.Mvc.FBGraphViewPage<DetailData>" %>

<asp:Content ID="t" ContentPlaceHolderID="TitleContent" runat="server">User: <%= Model.User.Name %></asp:Content>

<asp:Content ID="c" ContentPlaceHolderID="MainContent" runat="server">
    
    <div class="profile section">
        <h2>
            <%= Html.Picture(Model.User.Id, Model.User.Name) %>
            <a href="<%= Model.User.Link %>" target="_blank"><%= Model.User.Name %></a>
        </h2>
        <div class="content">
            <dl>
                <dt>Gender:</dt>
                <dd><%= Model.User.Gender %></dd>
            </dl>
            <dl>
                <dt>Birthday:</dt>
                <dd><%= Model.User.Birthday.ToShortDateString() %></dd>
            </dl>
            <dl>
                <dt>Hometown:</dt>
                <dd><%= Html.ActionLink(Model.User.Hometown.Name, "detail", "profile", new { id = Model.User.Hometown.Id }, null) %></dd>
            </dl>
            <% if (Model.User.Location.Id != null) { %>
            <dl>
                <dt>Location:</dt>
                <dd><%= Html.ActionLink(Model.User.Location.Name, "detail", "profile", new { id = Model.User.Location.Id }, null) %></dd>
            </dl>
            <% } %>
            <% if (!String.IsNullOrEmpty(Model.User.Website)) { %>
            <dl>
                <dt>Website(s):</dt>
                <dd>
                    <% foreach (var site in Model.User.Website.Split('\n')) { %>
                    <div><a href="<%= site %>"><%= site.Replace("http://", String.Empty).Replace("https://", String.Empty) %></a></div>
                    <% } %>
                </dd>
            </dl>
            <% } %>
        </div>
    </div>
    
    <div class="section">
        <h3>Activities</h3>
        <div class="content">
            <ul>
                <% foreach (var like in Model.Activities) Html.RenderPartial("Like", like); %>                
            </ul>
        </div>
    </div>
    
    <div class="section">
        <h3>Books</h3>
        <div class="content">
            <ul>
                <% foreach (var like in Model.Books) Html.RenderPartial("Like", like); %>
            </ul>
        </div>
    </div>
    
    <div class="section">
        <h3>Interests</h3>
        <div class="content">
            <ul>
                <% foreach (var like in Model.Interests) Html.RenderPartial("Like", like); %>
            </ul>
        </div>
    </div>
    
    <div class="section">
        <h3>Movies</h3>
        <div class="content">
            <ul>
                <% foreach (var like in Model.Movies) Html.RenderPartial("Like", like); %>
            </ul>
        </div>
    </div>
    
    <div class="section">
        <h3>Music</h3>
        <div class="content">
            <ul>
                <% foreach (var like in Model.Music) Html.RenderPartial("Like", like); %>
            </ul>
        </div>
    </div>
    
    <div class="section">
        <h3>Television</h3>
        <div class="content">
            <ul>
                <% foreach (var like in Model.Television) Html.RenderPartial("Like", like); %>
            </ul>
        </div>
    </div>

    <br class="clear" />
</asp:Content>
